package com.ynet.middleground.user.bean;

import com.ynet.core.common.BaseReqObj;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @description: 证书管理证书申请并下载请求对象
 * @author: Wangxz
 * @create: 2019-11-08 14:10
 **/
@Data
@ApiModel(value = "证书申请并下载请求对象", description = "证书申请并下载请求对象")
public class GenerateCertReq extends BaseReqObj {
    private static final long serialVersionUID = -2150103901639216346L;
    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id", notes = "用户id", dataType = "Integer")
    private Integer userId;

    /**
     * uKey编号
     */
    @ApiModelProperty(value = "uKey编号", notes = "uKey编号", dataType = "String")
    private String ukeyId;

    /**
     * 证书类型
     */
    @ApiModelProperty(value = "证书类型1：普通证书,2：高级证书,1-1:签名单证-签名单证,1-2:签名单证-双证", notes = "证书类型1：普通证书,2：高级证书,1-1:签名单证-签名单证,1-2:签名单证-双证", dataType = "String",required = true)
    @NotEmpty(message = "证书类型不能为空！")
    private String certType;

    /**
     * 申请书
     */
    @ApiModelProperty(value = "申请书(RSA算法生成2048位)", notes = "申请书(RSA算法生成2048位)", dataType = "String",required = true)
    @NotEmpty(message = "申请书不能为空！")
    private String p10;

    /**
     * 客户类型：1:个人;2:企业;3:服务器;6:设备证书;7:场景证书;8:个人生物识别证书;9:企业生物识别证书
     */
    @ApiModelProperty(value = "客户类型1:个人;2:企业;3:服务器;6:设备证书;7:场景证书;8:个人生物识别证书;9:企业生物识别证书", notes = "客户类型1:个人;2:企业;3:服务器;6:设备证书;7:场景证书;8:个人生物识别证书;9:企业生物识别证书", dataType = "String")
    private String customerType;


    /**
     * 默认CA证书有效期，默认单位月，可配置
     */
    @ApiModelProperty(value = "默认CA证书有效期，默认单位月，可配置", notes = "默认CA证书有效期，默认单位月，可配置", dataType = "String",required = true)
    @NotEmpty(message = "默认CA证书有效期不能为空！")
    private String duration;

    @ApiModelProperty(value = "用户名称,(若上传userid则不需上传该字段)", notes = "用户名称", dataType = "String")
    private String userName;

    @ApiModelProperty(value = "证件种类,00-统一社会信用代码,01-组织机构代码证,02-营业执照,03-税务登记证,(若上传userid则不需上传该字段)", notes = "证件种类", dataType = "String")
    private String papersType;

    @ApiModelProperty(value = "证件号,(若上传userid则不需上传该字段)", notes = "证件号,(若上传userid则不需上传该字段)", dataType = "String")
    private String papersNo;
}
